/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ucb.sispro.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author felipe
 */
@Entity
@Table(name = "taxas")
@NamedQueries({
    @NamedQuery(name = "Taxas.findAll", query = "SELECT t FROM Taxas t"),
    @NamedQuery(name = "Taxas.findByIdTaxas", query = "SELECT t FROM Taxas t WHERE t.idTaxas = :idTaxas"),
    @NamedQuery(name = "Taxas.findByPedidoMinimo", query = "SELECT t FROM Taxas t WHERE t.pedidoMinimo = :pedidoMinimo"),
    @NamedQuery(name = "Taxas.findByTaxaEntrega", query = "SELECT t FROM Taxas t WHERE t.taxaEntrega = :taxaEntrega")})
public class Taxas implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idTaxas")
    private Integer idTaxas;
    @Basic(optional = false)
    @Column(name = "pedidoMinimo")
    private float pedidoMinimo;
    @Basic(optional = false)
    @Column(name = "taxaEntrega")
    private float taxaEntrega;
    @JoinColumn(name = "Estabelecimento_idEstabelecimento", referencedColumnName = "idEstabelecimento")
    @ManyToOne(optional = false)
    private Estabelecimento estabelecimentoidEstabelecimento;

    public Taxas() {
    }

    public Taxas(Integer idTaxas) {
        this.idTaxas = idTaxas;
    }

    public Taxas(Integer idTaxas, float pedidoMinimo, float taxaEntrega) {
        this.idTaxas = idTaxas;
        this.pedidoMinimo = pedidoMinimo;
        this.taxaEntrega = taxaEntrega;
    }

    public Integer getIdTaxas() {
        return idTaxas;
    }

    public void setIdTaxas(Integer idTaxas) {
        this.idTaxas = idTaxas;
    }

    public float getPedidoMinimo() {
        return pedidoMinimo;
    }

    public void setPedidoMinimo(float pedidoMinimo) {
        this.pedidoMinimo = pedidoMinimo;
    }

    public float getTaxaEntrega() {
        return taxaEntrega;
    }

    public void setTaxaEntrega(float taxaEntrega) {
        this.taxaEntrega = taxaEntrega;
    }

    public Estabelecimento getEstabelecimentoidEstabelecimento() {
        return estabelecimentoidEstabelecimento;
    }

    public void setEstabelecimentoidEstabelecimento(Estabelecimento estabelecimentoidEstabelecimento) {
        this.estabelecimentoidEstabelecimento = estabelecimentoidEstabelecimento;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idTaxas != null ? idTaxas.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Taxas)) {
            return false;
        }
        Taxas other = (Taxas) object;
        if ((this.idTaxas == null && other.idTaxas != null) || (this.idTaxas != null && !this.idTaxas.equals(other.idTaxas))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.ucb.sispro.model.Taxas[ idTaxas=" + idTaxas + " ]";
    }
    
}
